<!-- 申请售后 -->
<template>
	<view class="aftersale-apply">
		<view class="content">
			<navigator class="item" v-if="orderState == 1" :url="'/pages/aftersale/aftersale-apply-detail?type=returnPrice' + '&id=' + id + '&orderNo=' + orderNo">
				<list-item :name="'申请退款'" :icon-type="'none'" :arrow-show="true" :name-size="30" :name-color="'#626679'"></list-item>
			</navigator>
			<navigator class="item" v-if="orderState != 1" :url="'/pages/aftersale/aftersale-apply-detail?type=return' + '&id=' + id + '&orderNo=' + orderNo">
				<list-item :name="'退货'" :icon-type="'none'" :arrow-show="true" :name-size="30" :name-color="'#626679'"></list-item>
			</navigator>
			<navigator class="item" v-if="orderState != 1"  :url="'/pages/aftersale/aftersale-apply-detail?type=exchange' + '&id=' + id + '&orderNo=' + orderNo">
				<list-item :name="'换货'" :icon-type="'none'" :arrow-show="true" :name-size="30" :name-color="'#626679'"></list-item>
			</navigator>
		</view>
	</view>
</template>

<script>
import listItem from '@/components/list-item/list-item.vue';
export default {
	components: {
		listItem
	},
	data() {
		return {
			id: '', //订单id
			orderNo: '', //订单号
			orderState: null //订单状态
		};
	},
	methods: {},
	onLoad(option) {
		if (option.id) this.id = option.id;
		if (option.orderNo) this.orderNo = option.orderNo;
		if (option.orderState) this.orderState = parseInt(option.orderState);
	}
};
</script>

<style lang="scss" scoped>
.aftersale-apply {
	padding: 20rpx;
	.content {
		background-color: #fff;
		border-radius: 6px;
		.item {
			// display: flex;
			// width: 100%;
			padding: 10rpx 0rpx;
			background-color: #fff;
			box-sizing: border-box;
		}
		.item:nth-child(1) {
			border-radius: 6px 6px 0px 0px;
		}
		.item:nth-last-child(1) {
			border-radius: 0px 0px 6px 6px;
		}
		.item:nth-last-child(n + 2) {
			border-bottom: 2rpx solid #efeff0;
		}
	}
}
</style>
